home *** CD-ROM | disk | FTP | other *** search
/ Crosscountry USA Photo Safari / Crosscountry USA Photo Safari.iso / Data / cc_base / pak00_16bit_f.pk3 / ferry_alert.gl.p < prev    next >
Text File  |  2002-11-29  |  3KB  |  94 lines

  1. {
  2.   X = 150;
  3.   Y = 150; 
  4.   Hidden = TRUE;
  5.  
  6.   ScriptID = Script {
  7.     @show {
  8.       GuiToFront(SELF);
  9.     }
  10.   };
  11.   
  12.   ChildID = {
  13.     GuiAnimation("get_rid_of_it") {
  14.       IgnoreTransparency = TRUE;
  15.       ScriptID = script {
  16.         @loaded {
  17.           ResPropSetInt(SELF,"X"     ,-ResPropGetInt(SELF,"ScreenX"));
  18.           ResPropSetInt(SELF,"Y"     ,-ResPropGetInt(SELF,"ScreenY"));
  19.           ResPropSetInt(SELF,"Width" ,CVarGetInt("SCREEN_MAX_X"));
  20.           ResPropSetInt(SELF,"Height",CVarGetInt("SCREEN_MAX_Y"));
  21.         }
  22.       }
  23.     },
  24.  
  25.     GuiAnimation("save_background") {
  26.       AnimationID = "gui/dash/prompt_window.pcx";      
  27.       X = 0;
  28.       Y = 0;
  29.       Height = 120;
  30.       Width  = 350;  
  31.     },
  32.     GuiButton("yes_button") {
  33.       X = 55;
  34.       Y = 82;
  35.       TextID = Mangle(68/*"Wait"*/);
  36.       Width = 100;
  37.       StyleID = "gui/dash/tab/button/tab.gbs";
  38.       FontID = "font/tab_button.tf";      
  39.       AutoSize = HEIGHT;
  40.       ScriptID = Script {
  41.         @activate { 
  42.           int time_now;
  43.           int fatigue;
  44.           int hunger;
  45.           
  46.           resid Player;
  47.           resid Game;
  48.           
  49.           
  50.           Game   = ResByName("Game");
  51.           Player = ResPropGetResID(Game,"game_cur_player");
  52.  
  53.           ResPropAlias(Player,"time_now","time_now");
  54.           ResPropAlias(Player,"player_hunger","hunger");
  55.           ResPropAlias(Player,"player_fatigue","fatigue");            
  56.  
  57.           time_now += CVarGetInt("ferry_wait_time");
  58.           
  59.           fatigue = Min(ResPropGetInt(Game,"game_fatigue_limit"), fatigue + CVarGetInt("ferry_wait_time"));
  60.           hunger  = Min(ResPropGetInt(Game,"game_hunger_limit"), hunger + CVarGetInt("ferry_wait_time"));          
  61.           
  62.            
  63.           CVarSetInt("ferry_wait_time",0);
  64.           ResPropSetInt(GuiParent(SELF),"Hidden",TRUE);
  65.         }
  66.       };    /* END OF SAVE BUTTON SCRIPT */
  67.     },  
  68.         
  69.     GuiButton("no_button") {
  70.       X = 190;
  71.       Y = 82;
  72.       TextID = Mangle(69/*"Cancel"*/);
  73.       Width = 100;
  74.       StyleID = "gui/dash/tab/button/tab.gbs";
  75.       FontID = "font/tab_button.tf";          
  76.       AutoSize = HEIGHT;
  77.       ScriptID = Script {
  78.         @activate { 
  79.           ResPropSetInt(GuiParent(SELF),"Hidden",TRUE);
  80.         }
  81.       };    /* END OF SAVE BUTTON SCRIPT */
  82.     },  
  83.     GuiTextInput("message") {
  84.       X = 10;
  85.       Y = 17;
  86.       Width = 300;
  87.       Height = 50;
  88.       WordWrap = TRUE;
  89.       InputDisabled = TRUE;
  90.       FontID = "font/verdana_black_bold_12.tf";
  91.     }         
  92.   };
  93. }
  94.